using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration.Install;
using Microsoft.Win32;
using System.ComponentModel;

namespace RallyDeskCustomAction
{
    [RunInstaller(true)]
    public class RallyDeskCustomAction :  System.Configuration.Install.Installer    
    {

        private const string ROOT_REGISTRY_KEY = @"Software\RallyDesk\";
        
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
        }

        public override void Uninstall(System.Collections.IDictionary savedState)
        {
            base.Uninstall(savedState);
            
            try
            {
                Registry.CurrentUser.DeleteSubKeyTree(ROOT_REGISTRY_KEY);
            }
            catch (Exception)
            {
            
            }
        }    }
}
